<?php
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;

?>

<style>
    .add_user li input[type='password'] {
        width: 240px;
        height: 32px;
        line-height: 32px;
    }
</style>


<div class="row">
    <div class="container lh30">
        修改密码
    </div>
</div>

<div class="container mt10">
    <style>
        .itemList .item-name{width: 70px;}
        input[type="text"]{padding-left: 10px;}
        input[type="reset"] {background-color:#999;}
    </style>

    <?php $form = ActiveForm::begin(['id'=>'myform']);?>
    <ul class="add_user">
        <li class="itemList clearfix">
            <label class="item-name">原密码</label>
            <div class="item-txt">
                <?= Html::activePasswordInput($model, 'password',['placeholder' => ' 输入原密码'], ['datatype' => '*']) ?>
                <span class="red">*</span>
            </div>
        </li>
        <li class="itemList clearfix">
            <label class="item-name">新密码</label>
            <div class="item-txt">
                <?= Html::activePasswordInput($model, 'newPassword',['placeholder' => ' 输入新密码'], ['datatype' => '*']) ?>
                <span class="red">*</span>
            </div>
        </li>
        <li class="itemList clearfix">
            <label class="item-name">密码确认</label>
            <div class="item-txt">
                <?= Html::activePasswordInput($model, 'oldNewPassword',['placeholder' => ''], ['datatype' => '*']) ?>
                <span class="red">*</span>
            </div>
        </li>

    </ul>
    <div style="padding-left: 80px;">
        <span class="btnBg" style="width: 92px; height: 32px;line-height: 32px;">
			  <input type="submit" value="确定" style="display: inline-block; width: 100%; background: 0; border: 0 ;padding: 0" /></span>
		  <span class="btnBg bg_rest ml20" style="width: 92px; height: 32px;line-height: 32px;">
			 <input type="reset" value="取消"  class="rest" style="display: inline-block; width: 100%; background: 0; border: 0;padding: 0"/></span>
    </div>

    <?php ActiveForm::end();?>
</div>

<script>
<?php $this->beginBlock('js_index') ?>

<?php
$session = Yii::$app->session;
if ($session->hasFlash('success')) {
    echo "layer.alert('{$session->getFlash('success')}', {icon:1});";
}
?>

<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['js_index'], $this::POS_END); ?>
</script>

